/*
 * AnimatedItem.java
 * 
 * Created on Nov 14, 2007, 8:07:03 PM
 * 
 * Copyright 2008 David D. Emory
 * 
 * This file is part of Five Points. See <http://www.fpdev.org> for
 * additional information regarding the project.
 * 
 * Five Points is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Five Points is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Five Points.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.fpdev.apps.rtemaster.gui.map;

/**
 *
 * @author demory
 */
public abstract class AnimatedItem implements Comparable {

  protected int startTime_,  endTime_;

  public AnimatedItem(int startTime, int endTime) {
    startTime_ = startTime;
    endTime_ = endTime;
  }

  @Override
  public int compareTo(Object o) {
    return new Integer(startTime_).compareTo(new Integer(((AnimatedItem) o).startTime_));
  }

  public int getStartTime() {
    return startTime_;
  }

  public int getEndTime() {
    return endTime_;
  }

  public abstract void draw(int time, MapCanvas canvas);
}
